<?php


class Membergroup extends CActiveRecord
{
	
	public function tableName()
	{
		return 'membergroup';
	}

	
	public function rules()
	{
		
		
		return array(
         array('MembergroupName', 'required', 'message' => '{attribute} không được bỏ trống'),
			array('IsActive', 'numerical', 'integerOnly'=>true),
			array('MembergroupName', 'length', 'max'=>50),
         
			
			
			array('MemberGroupID, MembergroupName, IsActive', 'safe', 'on'=>'search'),
		);
	}

	
	public function relations()
	{
		
		
		return array(
		);
	}

	
	public function attributeLabels()
	{
		return array(
			'MemberGroupID' => 'ID',
			'MembergroupName' => 'Tên nhóm',
			'IsActive' => 'Kích hoạt',
		);
	}

	
	public function search()
	{
		

		$V0v5vsnfxezw=new CDbCriteria;

		$V0v5vsnfxezw->compare('MemberGroupID',$this->MemberGroupID,true);
		$V0v5vsnfxezw->compare('MembergroupName',$this->MembergroupName,true);
		$V0v5vsnfxezw->compare('IsActive',$this->IsActive);

		return new CActiveDataProvider($this, array(
			'criteria'=>$V0v5vsnfxezw,
		));
	}

	
	public static function model($Vgmajjibziuy=__CLASS__)
	{
		return parent::model($Vgmajjibziuy);
	}
}
